last=vector(end);
vector=vector(1:max(size(vector))-1);  %reduces vector one order
iteration=iteration+1;